package control;

import backserver.BackServer;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by Administrator on 2016/1/8.
 */
@Controller
@RequestMapping(value="/server")
public class ServerControl {
    @RequestMapping(value="start")
    public String start(ModelMap modelMap){
        BackServer.start();
        modelMap.put("mess","启动成功");
        return "mess";
    }

    @RequestMapping(value="stop")
    public String stop(ModelMap modelMap){
        BackServer.stop();
        modelMap.put("mess","停止成功");
        return "mess";
    }
}
